<template>
  <el-config-provider :locale="currentLocale">
    <router-view />
    <ReDialog />
  </el-config-provider>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import { ElConfigProvider } from "element-plus";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import { ReDialog } from "@/components/ReDialog";
import ua2obj from 'ua2obj'
export default defineComponent({
  name: "app",
  components: {
    [ElConfigProvider.name]: ElConfigProvider,
    ReDialog
  },
  computed: {
    currentLocale() {
      ua2obj()
      return zhCn;
    }
  },
  created() {
    this.gitApp()
  },
  methods: {
    gitApp() {
      const ua = navigator.userAgent
      const uaObj = ua2obj(ua)
      if (uaObj.osName == "iPhone" && uaObj.browserName == 'QQBrowser') {
        this.$message.error('请使用浏览器打开')
      }
    }
  },

});
</script>
